package com.zhangjianling.premp.controller.sys;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面跳转路由
 * @author 张建玲
 *
 */
@Controller
@RequestMapping(value = "/route")
public class RouteController {
	/**
	 * @param page：页面
	 * @return
	 */
	@GetMapping(value = "/{page}")
	public String path(@PathVariable String page) {
		return page;
	}

	/**
	 * @param path：文件夹
	 * @param page：页面
	 * @return
	 */
	@GetMapping(value = "/{path}/{page}")
	public String path(@PathVariable String path,@PathVariable String page) {
		return path+"/"+page;  
	}
	/**
	 * @param path：文件夹
	 * @param page：页面
	 * @return
	 */
	@GetMapping(value = "/{path}/{subpath}/{page}")
	public String path(@PathVariable String path,@PathVariable String page,@PathVariable String subpath) {
		return path+"/"+subpath+"/"+page;  
	}
}
